<template>
	<!-- 盒子 -->
	<view class="box" :data-theme="theme">
		<!-- 消息提示 -->
		<view class="hint">
			<!-- 活动规则说明 -->
			<view class=hint-l>活动规则说明</view>
			<!-- 查看详情 -->
			<navigator class="hint-r" url="http://www.baidu.com">
				<!-- 图标 -->
				<u-icon label="查看详情" size="15" name="arrow-right" labelPos="left" labelColor="#df7b61"
					color="#df7b61"></u-icon>
			</navigator>
		</view>
		<!-- 内容 -->
		<view class="content">
			<!-- 优惠券管理 -->
			<MarketingItem />
		</view>
	</view>
</template>

<script>
	import {
		setThemeColor
	} from "../../utils/setTheme";
	import MarketingItem from "./components/marketingItem/marketingItem.vue"
	let app = getApp();
	export default {
		// 组件注册
		components: {
			// 注册item
			MarketingItem
		},
		// 数据
		data() {
			return {
				bgColor: '#ffffff',
				theme: app.globalData.theme,

			}
		},
		// 函数
		methods: {

		},
		onLoad() {
			this.bgColor = setThemeColor();
			uni.setNavigationBarColor({
				frontColor: '#ffffff',
				backgroundColor: this.bgColor
			})
		}
	}
</script>

<style lang="scss">
	.bg_color {
		@include main_bg_color(theme)
	}

	// 营销活动
	.box {
		display: flex;
		flex-direction: column;
		align-items: center;

		// 消息提示
		.hint {
			width: 100%;
			height: 40px;
			display: flex;
			align-items: center;
			justify-content: space-between;
			background-color: #fff1ee;
			color: #df7b61;
			font-size: 14px;
			font-weight: 700;

			// 消息提示左侧
			.hint-l {
				margin-left: 20px;
			}

			//	消息提示右侧
			.hint-r {
				margin-right: 20px;
			}
		}

		// 内容主题盒子
		.content {
			width: 95%;
		}

	}
	
	.box-r{
		text-align: center;
		align-items: center;
		margin-top: 10rpx;
	}
</style>